package com.jk.dmpayprovider.controller;

import com.jk.dmcommon.entity.CouponEntity;
import com.jk.dmcommon.entity.GoodsEntity;
import com.jk.dmcommon.entity.OrderEntity;
import com.jk.dmcommon.entity.ShopEntity;
import com.jk.dmpayprovider.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 文件名称:OrderController
 *
 * @Description //TODO $
 * @Date $ $
 * 作者 郭英杰
 * Copyright (c) 2021, yuxy123@gmail.com All Rights Reserved.</pre>
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    //提交订单
    @RequestMapping("orderQuery")
    private void orderQuery(Integer leaveId,HttpServletRequest request,Double totalPrices,String site,Integer goodsCount,Integer couponId){
        orderService.orderQuery(leaveId,request,totalPrices,site,goodsCount,couponId);
    }

   /* @RequestMapping("oedercs")
    public void oedercs(HttpServletRequest request){
        orderService.oedercs(request);
    }*/
    /*配送方式*/
    @RequestMapping("distribution")
    public ShopEntity distribution(Integer leaveId){
        ShopEntity shop=  orderService.distribution(leaveId);
        return shop;
    }
    //查询优惠券
    @RequestMapping("queryCoupon")
    public CouponEntity queryCoupon(Integer couponId){
       return orderService.queryCoupon(couponId);
    }

}
